package com.demo.one_3.controller;

import com.demo.one_3.factory.IDFactory;
import com.demo.one_3.factory.IHFactory;
import com.demo.one_3.factory.impl.DFactoryService;
import com.demo.one_3.factory.impl.HFactoryService;

/**
 * @author SunChangSheng
 * @apiNote
 * @since 2021/12/15 17:36
 */
public class Controller {
    public static void main(String[] args) {
        //花为电子厂
        IHFactory ihFactory = new HFactoryService();
        ihFactory.mouse().production();
        ihFactory.keyboard().production();
        //大米电子厂
        IDFactory idFactory = new DFactoryService();
        idFactory.mouse().production();
        idFactory.keyboard().production();

        //输出结果
//        花为电子厂，生产鼠标
//        花为电子厂，生产键盘
//        大米电子厂，生产鼠标
//        大米电子厂，生产键盘
    }
}
